package com.steakliu.sun.proxy;

import com.steakliu.sun.proxy.api.ProxyFactory;
import com.steakliu.sun.spi.annotation.Join;

import java.lang.reflect.Proxy;

/**
 * 功能说明：
 * <p>
 * Original @Author: steakliu-刘牌, 2023-01-08  20:29
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
@Join
public class JdkProxy<T> extends BaseProxy<T> implements ProxyFactory{

    @Override
    public <T> T createProxy(Class<T> clazz) {
        return (T) Proxy.newProxyInstance(clazz.getClassLoader(),
                new Class[]{clazz},
                objectProxy);
    }
}
